/*
 * BSM6.0
 *
 * Copyright 2012-2013 (C) SINODATA CO., LTD. All Rights Reserved.
 */
package com.sinodata.bsm.inmp.service;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * Description:
 * </p>
 * 
 * @author tangli
 * @version 1.0
 * 
 * <p>
 * History:
 * 
 * Date Author Version Description
 * ---------------------------------------------------------------------------------
 * 2012-5-14 下午3:48:43 tangli 1.0 To create
 * </p>
 * 
 * @since
 * @see
 */
public final class ServiceFactory {
    public final static Map<String, Object> serviceMap = new HashMap<String, Object>();

    public static void init() {
        serviceMap.put("ResService", new ResService());
        serviceMap.put("PropertyService", new PropertyService());
        serviceMap.put("CollectorTestService", new CollectorTestService());
        serviceMap.put("CollectorService", new CollectorService());
        serviceMap.put("ResFindService", new ResFindService());
        serviceMap.put("SystemService", new SystemService());
    }

    public static Object get(String className) {
        return serviceMap.get(className);
    }

    public static ResService getResService() {
        return (ResService) get("ResService");
    }

    public static CollectorTestService getCollectorTestService() {
        return (CollectorTestService) get("CollectorTestService");
    }

    public static CollectorService getCollectorService() {
        return (CollectorService) get("CollectorService");
    }

    public static PropertyService getPropertyService() {
        return (PropertyService) get("PropertyService");
    }
}
